<!--Copyright (C) Kherty.  All rights reserved.-->
<UserControl
  x:Class="OpenLS.Spreadsheet.UI.AlignmentControl"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:ssui="clr-namespace:OpenLS.Spreadsheet.UI"
  xmlns:ss="http://schemas.Kherty.com/office/2007/spreadsheet"
  xmlns:Internals="clr-namespace:OpenLS.Spreadsheet.UI.Internals"
  xmlns:Internals1="clr-namespace:OpenLS.UI.Internals;assembly=OpenLS.UI"
  xmlns:oui="clr-namespace:OpenLS.UI;assembly=OpenLS.UI"
  xmlns:Resources="clr-namespace:OpenLS.Spreadsheet.UI.Internals.Resources">
  <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ssui:EnumResources/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
  </UserControl.Resources>
    <Border BorderBrush="Black" BorderThickness="1" Background="Beige" CornerRadius="18">
  <DockPanel>
    <DockPanel.Resources>
      <Style TargetType="{x:Type Label}">
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0"/>
      </Style>
    </DockPanel.Resources>
    <GroupBox Header="{x:Static Internals1:UIStringTable.Orientation}" DockPanel.Dock="Right"></GroupBox>

    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
      </Grid.RowDefinitions>
      <GroupBox Header="{x:Static Resources:UIStringTable.TextAlignment}">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
          </Grid.ColumnDefinitions>
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
          </Grid.RowDefinitions>
          <StackPanel Orientation="Horizontal" ><Label Content="{x:Static Resources:UIStringTable.Horizontal_}" />
                        <TextBlock Text=" :" /></StackPanel>
          <ComboBox Grid.Row="1" Name="horizontalAlignmentControl" 
                    SelectionChanged="OnHorizontalAlignmentChanged" Margin="0 0 8 0">
            <ComboBox.ItemsSource>
              <Binding Source="{x:Type ss:HorizontalCellAlignment}">
                <Binding.Converter>
                  <ssui:EnumValueEnumerator></ssui:EnumValueEnumerator>
                </Binding.Converter>
              </Binding>
            </ComboBox.ItemsSource>
          </ComboBox>
                    <StackPanel Grid.Row="2" Orientation="Horizontal" >
                        <Label Content="{x:Static Resources:UIStringTable.Vertical_}" />
            <TextBlock Text=" :" /></StackPanel>
          <ComboBox Grid.Row="3" Name="verticalAlignmentControl" Margin="0 0 8 0" SelectionChanged="OnVerticalAlignmentChanged">
            <ComboBox.ItemsSource>
              <Binding Source="{x:Type ss:VerticalCellAlignment}">
                <Binding.Converter>
                  <ssui:EnumValueEnumerator></ssui:EnumValueEnumerator>
                </Binding.Converter>
              </Binding>
            </ComboBox.ItemsSource>
          </ComboBox>
                    <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1" Margin="5 0 0 0">
                        <Label Content="{x:Static Resources:UIStringTable.Indent_}"/>
                        <TextBlock Text=" :"/>
                        </StackPanel>
                    <oui:NumericUpDown Grid.Column="1" Grid.Row="2" Value="{Binding Path=Indentation}" Margin="5 0 0 0"/>
<!--                    <Grid  >
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBox Text="{Binding Path=Indentation}" Grid.RowSpan="2" MinWidth="50"/>
            <RepeatButton Grid.Column="1" MinWidth="8"/>
            <RepeatButton Grid.Column="1"  Grid.Row="1" MinWidth="8"/>
          </Grid> -->
        </Grid>
      </GroupBox>
      <GroupBox Header="{x:Static Resources:UIStringTable.TextControl}" Grid.Row="1">
        <StackPanel Orientation="Vertical">
          <CheckBox Content="{Binding Source={x:Static ssui:SpreadsheetEditingCommands.ToggleTextWrapping}, Path=Text}" />
          <CheckBox Content="{Binding Source={x:Static ssui:SpreadsheetEditingCommands.ShrinkToFit}, Path=Text}"/>
          <CheckBox Content="{Binding Source={x:Static ssui:SpreadsheetEditingCommands.MergeCells}, Path=Text}"/>
        </StackPanel>
      </GroupBox>
    </Grid>
  </DockPanel>
    </Border>
</UserControl>
